Open
Conversation
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.0.18-pr.87.0d0145aPrefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.0.18-pr.87.0d0145a"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.0.18-pr.87.0d0145a"
}
}
Preview published to npm registry — try new features instantly! |
ff38110 to
e085ec0
Compare
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add support for
--jsonflag across all CLI commands to enable machine-readable output for scripting and automation use cases.Related Issue
N/A
Type of Change
Changes Made
--jsonflag to the CLI entry point with apreActionhook to set JSON modesrc/cli/utils/json.tswith utilities:setJsonMode(),isJsonMode(),outputJson(),outputJsonError()RunCommandResult<TData>generic to support typed JSON output datadatafor JSON output:whoami: returns{ email, name }entities push: returns{ created, updated, deleted }functions deploy: returns{ deployed, errors }project create: returns{ name, id, root, dashboardUrl }project dashboard: returns{ dashboardUrl }project link: returns{ projectId, dashboardUrl }site deploy: returns{ appUrl }or{ cancelled: true }login,logout) useRunCommandResult<never>log.*calls and spinners in JSON mode viaisJsonMode()checkssite deploy)AGENTS.mdwith comprehensive JSON output documentation and guidelinesTesting
npm test)Checklist
Additional Notes
JSON Output Structure
Success responses (stdout):
{ "success": true, "data": { /* command-specific data */ } }Error responses (stderr):
{ "success": false, "error": { "message": "Error description", "code": "ERROR_CODE" } }Exceptions
loginandlogoutdo not support--jsonas they are user-facing authentication commands that require interactive browser flow